/**
 * @param {number[]} nums
 * @return {boolean}
 */
var canAliceWin = function (nums) {
  let oneSum = 0
  let twoSum = 0
  let restSum = 0
  nums.forEach(x => {
    if (x < 10) {
      oneSum += x
    } else if (x < 100) {
      twoSum += x
    } else {
      restSum += x
    }
  })

  if (oneSum > twoSum + restSum) {
    return true
  }
  if (twoSum > oneSum + restSum) {
    return true
  }
  return false
};


let res = canAliceWin([11, 22, 3, 5, 7, 8, 1])
console.log(res)